home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / gnome-vfs-2.0 / libgnomevfs / gnome-vfs-handle.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-05-01  |  2.5 KB  |  81 lines

  1. /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
  2. /* gnome-vfs-handle.h - Handle object for GNOME VFS files.
  3.  
  4.    Copyright (C) 1999 Free Software Foundation
  5.  
  6.    The Gnome Library is free software; you can redistribute it and/or
  7.    modify it under the terms of the GNU Library General Public License as
  8.    published by the Free Software Foundation; either version 2 of the
  9.    License, or (at your option) any later version.
  10.  
  11.    The Gnome Library is distributed in the hope that it will be useful,
  12.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.     See the GNU
  14.    Library General Public License for more details.
  15.  
  16.    You should have received a copy of the GNU Library General Public
  17.    License along with the Gnome Library; see the file COPYING.LIB.  If not,
  18.    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  19.    Boston, MA 02111-1307, USA.
  20.  
  21.    Author: Ettore Perazzoli <ettore@comm2000.it>
  22. */
  23.  
  24. #ifndef GNOME_VFS_HANDLE_H
  25. #define GNOME_VFS_HANDLE_H
  26.  
  27. #include <libgnomevfs/gnome-vfs-context.h>
  28. #include <libgnomevfs/gnome-vfs-file-size.h>
  29. #include <libgnomevfs/gnome-vfs-file-info.h>
  30.  
  31. G_BEGIN_DECLS
  32.  
  33. typedef gpointer GnomeVFSMethodHandle;
  34. /**
  35.  * GnomeVFSHandle:
  36.  *
  37.  * Handle to a file, a handle is obtained using gnome_vfs_open and gnome_vfs_create
  38.  * family of functions on the file. A handle represents a file stream, gnome_vfs_close,
  39.  * gnome_vfs_write, gnome_vfs_read and all the other operations take a GnomeVFSHandle
  40.  * that identifies the file where the operation is going to be performed.
  41.  **/
  42. typedef struct GnomeVFSHandle GnomeVFSHandle;
  43.  
  44. /**
  45.  * GnomeVFSOpenMode:
  46.  * @GNOME_VFS_OPEN_NONE:
  47.  * @GNOME_VFS_OPEN_READ:
  48.  * @GNOME_VFS_OPEN_WRITE:
  49.  * @GNOME_VFS_OPEN_RANDOM:
  50.  * @GNOME_VFS_OPEN_TRUNCATE:
  51.  *
  52.  * Mode in which files are opened. If GNOME_VFS_OPEN_RANDOM is not used, the
  53.  * file will be have to be accessed sequentially.
  54.  **/
  55. typedef enum {
  56.         GNOME_VFS_OPEN_NONE = 0,
  57.         GNOME_VFS_OPEN_READ = 1 << 0,
  58.         GNOME_VFS_OPEN_WRITE = 1 << 1,
  59.         GNOME_VFS_OPEN_RANDOM = 1 << 2,
  60.     GNOME_VFS_OPEN_TRUNCATE = 1 << 3
  61. } GnomeVFSOpenMode;
  62.  
  63. /**
  64.  * GnomeVFSSeekPosition:
  65.  * @GNOME_VFS_SEEK_START: Start of the file.
  66.  * @GNOME_VFS_SEEK_CURRENT: Current position.
  67.  * @GNOME_VFS_SEEK_END: End of the file.
  68.  *
  69.  * This is used to specify the start position for seek operations.
  70.  **/
  71. typedef enum {
  72.         GNOME_VFS_SEEK_START,
  73.         GNOME_VFS_SEEK_CURRENT,
  74.         GNOME_VFS_SEEK_END
  75. } GnomeVFSSeekPosition;
  76.  
  77.  
  78. G_END_DECLS
  79.  
  80. #endif /* GNOME_VFS_HANDLE_H */
  81.